package com.jkc.xh.adapters;

import android.view.ViewGroup;

import com.jkc.xh.R;
import com.jkc.xh.adapters.core.BaseRecyclerAdapter;
import com.jkc.xh.adapters.viewholder.RevokeOrderItemView;
import com.jkc.xh.adapters.viewholder.RevokeOrderItemView_;
import com.jkc.xh.models.RevokeModel;

/**
 *
 */
public class RevokeOrderAdapter extends BaseRecyclerAdapter<RevokeModel, RevokeOrderItemView> {

    @Override
    protected RevokeOrderItemView onCreateItemView(ViewGroup parent, int viewType) {
        return RevokeOrderItemView_.build(parent.getContext());
    }

    @Override
    protected void onBindView(RevokeOrderItemView itemView, RevokeModel orderModel, int position) {
        itemView.bind(orderModel);
    }

    public void setListener(OnViewClickListener listener) {
        addOnViewClickListener(R.id.btnCancel, listener);
    }

}
